package com.plian.system.entity.pf;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.plian.Tools.DateUtil;
import com.plian.system.mybatis.base.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @Author: Take-off
 * @Description: TODO 经营业绩考核-国资审核 主表
 * @Date: 2022/12/15 10:54 AM
 * @Version: 1.0
 **/
@Data
@TableName("pf_base_business_audit")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "BaseBusinessAudit 对象", description = "经营业绩考核-国资审核 主表")
public class BaseBusinessAudit extends BaseEntity{

    @ApiModelProperty(value = "单据编码")
    private String code;

    @ApiModelProperty(value = "年度")
    private String fillingYear;

    @ApiModelProperty(value = "审核时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
    @JsonFormat(pattern = DateUtil.PATTERN_DATE)
    private Date auditTime;

    @ApiModelProperty(value = "填报单位")
    private String fillingUnitId;

    @ApiModelProperty(value = "审批人")
    private String approvedUser;

    @ApiModelProperty(value = "经办人")
    private String auditUser;

    @DateTimeFormat(pattern = DateUtil.PATTERN_DATETIME)
    @JsonFormat(pattern = DateUtil.PATTERN_DATETIME)
    @ApiModelProperty(value = "审批时间")
    private Date approvedTime;

    @ApiModelProperty(value = "审批意见")
    private String approvedOpinion;

    @ApiModelProperty(value = "单据类型")
    private String formType;

    @TableField(exist = false)
    @ApiModelProperty(value = "子表-财务绩效")
    private List<BusinessAudit> businessAudits;

    @TableField(exist = false)
    @ApiModelProperty(value = "子表-任务绩效")
    private List<TaskAudit> taskAudits;

    @TableField(exist = false)
    @ApiModelProperty(value = "子表-主责主业")
    private List<MainAudit> mainAudits;

    @TableField(exist = false)
    @ApiModelProperty(value = "子表-企业自评")
    private List<AuditAssets> auditAssets;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "基础表Id")
    private Long baseBusinessIndicatorsId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "年报id")
    private Long baseAnnalId;

    @ApiModelProperty(value = "是否下发:0-否，1-是")
    private Integer issued;

    @ApiModelProperty(value = "第三方标志")
    private String dataSource;

    @TableField(exist = false)
    @ApiModelProperty(value = "基础表Id")
    private String baseIndicatorsCodeId;
    @ApiModelProperty(value = "模块儿类型 0：原来，1，经理层")
    private Integer moduleType;
    @ApiModelProperty(value = "经理人id")
    private String staffId;
    @ApiModelProperty(value = "经理人姓名")
    private String staffName;
}
